package com.itheima.web.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author Xiao
 * @date 2021/9/4
 */
//@WebFilter("/*")
public class FilterDemo02 implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("FilterDemo02 before doFilter");
        filterChain.doFilter(servletRequest, servletResponse);
        System.out.println("FilterDemo02 after doFilter");
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }
    @Override
    public void destroy() {

    }
}
